package pro.lingwu.station.dto.db;

import io.swagger.annotations.ApiModel;
import lombok.*;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author @lingwu
 * @date created in 2021/11/15
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("Ticket")
public class Ticket {

    private Long id;
    @NotNull
    private Integer seat;
    @NotNull
    private String noId;
    @NotNull
    @Size(min = 10, max = 15)
    @Pattern(regexp = "[0-9a-zA-Z]{10,15}")
    private String account;
    private Integer passenger;
    /**
     * 表示票的状态
     * 0 未购买的票 过期/可以购买
     * 1 已购买的票
     * 2 退的票 过期/可用购买
     * 3 改签的票 过期/可以购买
     */
    private Integer status;

}
